Skip to content

feat: wire infographic URLs from Sanity doc through pipeline to Remotion#633

Merged
codercatdev merged 1 commit intodevfrom
feat/wire-infographic-urls
Mar 13, 2026
Merged

feat: wire infographic URLs from Sanity doc through pipeline to Remotion#633
codercatdev merged 1 commit intodevfrom
feat/wire-infographic-urls

Conversation

@codercatdev
Copy link
Contributor

Wire Infographic URLs from Sanity → Pipeline → Remotion

The InfographicScene component (PR #631) was merged but never received data — the pipeline wasn't reading infographic URLs from the Sanity doc or passing them to Remotion.

Problem

Sanity doc has infographics[] ──✗──> video-pipeline.ts ──✗──> remotion.ts ──✗──> SceneRouter
                                     (never read)           (never mapped)      (never rendered)

Fix

Sanity doc has infographics[] ──✓──> video-pipeline.ts ──✓──> remotion.ts ──✓──> SceneRouter → InfographicScene
                                     (getInfographicUrls)   (mapInputProps)     (Ken Burns zoom/pan)

Changes

lib/services/video-pipeline.ts (+71 lines):

  • Added getInfographicUrls(doc) helper with two strategies:
    1. Primary: Resolve doc.infographics[] Sanity image assets via @sanity/image-url
    2. Fallback: Parse doc.researchData JSON → extract infographicUrls[]
  • Wrapped in try/catch — never fails the pipeline over missing infographics
  • Round-robin distribution across scenes: infographicUrls[i % infographicUrls.length]
  • Only sets infographicUrl when URLs exist — scenes without infographics fall through to Pexels B-roll

lib/services/remotion.ts (+2 lines):

  • Added infographicUrl?: string to RenderInput.script.scenes type
  • Conditional spread in mapInputProps(): only includes infographicUrl when truthy (avoids empty string failing Zod .url().optional())

Scope

✅ 2 files, both in my ownership. No other files touched.

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
codingcat-dev Ignored Ignored Mar 13, 2026 1:59am

@codercatdev codercatdev merged commit e4d2a98 into dev Mar 13, 2026
2 of 3 checks passed
@codercatdev codercatdev deleted the feat/wire-infographic-urls branch March 13, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant